<template>
  <div>
    <Child :crud="crud" @change="change" />
  </div>
</template>
<script setup lang="ts">
import { getCurrentInstance, provide, reactive, ref } from 'vue'
import Child, { CrudApi } from './child.vue'

function change(num: number) {
  console.log(num)
}

function fun() {
  console.log('fun')
}
provide('fun', fun)

const crud = reactive<CrudApi>({
  refresh(val) {
    console.log(val)
  }
})

</script>

<style lang="scss" scoped></style>
